import { Module } from '@nestjs/common';
import { ArticleController } from './article.controller';
import { TypeOrmModule } from '@nestjs/typeorm';
import { ArticleService } from './article.service';
import { ArticleEntity } from './article.entity';
import { CommentEntity } from './comment.entity';
import { CacheService } from '../cache/cache.service';

@Module({
  imports: [TypeOrmModule.forFeature([ArticleEntity, CommentEntity])],
  controllers: [ArticleController],
  providers: [ArticleService, CacheService],
  exports: [ArticleService],
})
export class ArticleModule {}

/*
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { UserController } from './user.controller';
import { UserService } from './user.service';
import { UsersEntity } from './user.entity';

@Module({
 // imports: [TypeOrmModule.forFeature([UsersEntity])], //注入实体，可注入多个实体，是数组
  controllers: [ArticleController],
  providers: [UserService],
})
export class UserModule { }
*/
